package com.huoyun.userAdmin.dao;

import com.huoyun.base.dao.BaseDaoImpl;
import com.huoyun.userAdmin.bean.UserDetail;

public class UserDetailDaoImpl extends BaseDaoImpl<UserDetail> implements UserDetailDao {

	@Override
	public void saveUserDetail(UserDetail userDetail) 
	{
		sqlSessionTemplate.insert("com.huoyun.userAdmin.dao.UserDetailDaoMapper.saveUserDetail", userDetail);
	}

	@Override
	public UserDetail getUserDetailByUserId(long userId) 
	{
		return sqlSessionTemplate.selectOne("com.huoyun.userAdmin.dao.UserDetailDaoMapper.getUserDetailByUserId", userId);
	}

	@Override
	public void updateUserBaseInfo(UserDetail userDetail) 
	{
		sqlSessionTemplate.update("com.huoyun.userAdmin.dao.UserDetailDaoMapper.updateUserBaseInfo", userDetail);
	}

	@Override
	public void updateUserContactInfo(UserDetail userDetail) 
	{
		sqlSessionTemplate.update("com.huoyun.userAdmin.dao.UserDetailDaoMapper.updateUserContactInfo", userDetail);
	}

	@Override
	public void delete(long userId) 
	{
		sqlSessionTemplate.delete("com.huoyun.userAdmin.dao.UserDetailDaoMapper.delete", userId);
	}

}
